package cannes.bean.planning;

/***********************************************************************
 * Module:  Projection.java
 * Author:  p1000666
 * Purpose: Defines the Class Projection
 ***********************************************************************/
import java.util.*;

public class Projection {

    private int id;
    private Date horraire;
    private int planningId;
    private int salleId;
    private int filmId;
    private Set<Invitation> listeInvitation = new HashSet<Invitation>();

    public Projection(){}

    public Projection(int id, Date horraire, int planningId, int salleId, int filmId)
    {
        this.id = id;
        this.horraire = horraire;
        this.planningId = planningId;
        this.salleId = salleId;
        this.filmId = filmId;
    }
    
    public int getId() {
        return id;
    }

    public int getPlanning() {
        return planningId;
    }

    public int getSalle() {
        return salleId;
    }

    public int getFilm() {
        return filmId;
    }

    public Date getHorraire() {
        return horraire;
    }

    public Set<Invitation> getListeInvitation() {
        return listeInvitation;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setPlanning(int id) {
        this.planningId = id;
    }

    public void setSalle(int id) {
        this.salleId = id;
    }

    public void setFilm(int id) {
        this.filmId = id;
    }

    public void setHorraire(Date horraire) {
        this.horraire = horraire;
    }

    public void setListeInvitation(Set<Invitation> listeInvitation) {
        this.listeInvitation = listeInvitation;
    }

    public void addInvitation(Invitation invitation) {
        if (!this.listeInvitation.contains(invitation)) {
            this.listeInvitation.add(invitation);
        }
    }

    public void removeInvitation(Invitation invitation) {
        this.listeInvitation.remove(invitation);
    }
}
